<%@page contentType="text/html" pageEncoding="UTF-8"
        import="tcc.sglj.model.User"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%
    if (request.getSession().getAttribute("user") == null) {
        response.sendRedirect("index.jsp");
    }
%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <title>SGLJ</title>

        <link rel="stylesheet" href=<s:url value="/jquery/css/custom-theme/jquery-ui-1.8.10.custom.css"/>>
        <link rel="stylesheet" href=<s:url value="/css/tcc-sglj-global-css.css"/>>        
        <link rel="stylesheet" href=<s:url value="/css/tcc-sglj-menu-toolbar.css"/>>
        <link rel="stylesheet" href=<s:url value="/css/tcc-sglj-sistema.css"/>>
        <link rel="stylesheet" href=<s:url value="/jqgrid/css/ui.jqgrid.css"/>>
        <link rel="stylesheet" href=<s:url value="/css/button.add.css"/>>
        <link rel="stylesheet" href=<s:url value="/jdock/style.css"/>>

        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/js/jquery-1.4.4.min.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/js/jquery-ui-1.8.10.custom.min.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/development-bundle/ui/jquery.ui.core.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/development-bundle/ui/jquery.ui.widget.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/development-bundle/ui/jquery.ui.button.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/development-bundle/ui/jquery.ui.draggable.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/development-bundle/ui/jquery.ui.resizable.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/development-bundle/ui/jquery.ui.tabs.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jquery/development-bundle/ui/jquery.ui.accordion.js"/>></script>

        <script language="javascript" type="text/javascript" src=<s:url value="/jqgrid/js/jquery.jqGrid.min.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jqgrid/src/grid.loader.js"/>></script>

        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/tcc_sglj_util.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/tcc_sglj_maintain_service.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/tcc-sglj-sistema-functions.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/tcc_sglj_maintain_user.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/tcc_sglj_tabela_apoio.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/jquery.maskedinput.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jdock/js/interface.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jdock/js/jquery.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/jquery.validate.js"/>></script>
        <script language="javascript" type="text/javascript" src=<s:url value="/jscript/jquery.priceformat.js"/>></script>

        <script language="javascript" type="text/javascript">
            $(document).ready(function() {              
                $('#dock').Fisheye({
                    maxWidth: 50,
                    items: 'a',
                    itemsText: 'span',
                    container: '.dock-container',
                    itemWidth: 60,
                    proximity: 110,
                    halign : 'center'
                });

                $("#user_log").click(function(){
                    editar_usuario();
                });
                   
                $("#sair_sistema").click(function(){
                    $("#div_temp").append("<div id='a'></div>")
                    $("#div_temp").dialog({
                        modal : true,
                        open: function(){
                            $.post("service/teste", {}, function (teste){
                                $("#a").html(teste);
                            })
                        }
                    })
                });
        
            });
        </script>   
        <style>
            #topo {
                font-size: 12px;
                background-color: #f7f7f7;
                position: absolute;
                top: 0;
                left: 0;
                height: 30px;
                width: 100%;          
            }
            #topo .user_log {

                float: right;                
                margin-top: 8px;
                margin-right: 20px;
                cursor: pointer;
            }
            #topo .sair_sistema {                
                float: right;
                margin-top: 8px;
                margin-right: 2px;
                cursor: pointer;
            }
            #topo .botao_sair {
                float: right;
                margin-right: 20px;
                margin-top: 8px;
                cursor: pointer;
            }
        </style>
    </head>
    <body>

        <div id="topo">          
            <label class="botao_sair"><span class="ui-icon ui-icon-power" ></span></label>
            <label id="sair_sistema" class="sair_sistema">sair</label>
            <%
                User user = (User) request.getSession().getAttribute("user");
                if (user != null) {
                    out.println("<span id='user_log' class='user_log'>" + user.getName() + "</span>");
                }
            %>
        </div>
        <div id="home_teste"></div>
        <div class="dock" id="dock">
            <div class="dock-container">
                <a class="dock-item" href="#" id="administrar_usuario"><img src=<s:url value="/jdock/images/add_user.png" />  alt="teste" ><span>Cadastro Usuário</span></a> 
                <a class="dock-item" href="#" id="editar_cadastro"><img src=<s:url value="/jdock/images/edit_user.png" />><span>Editar Cadastro</span></a> 
                <a class="dock-item" href="#"><img src=<s:url value="/jdock/images/calendar-icon.png"  />><span>Agendar Atendimento</span></a> 
                <a class="dock-item" href="#"><img src=<s:url value="/jdock/images/car.png" />><span>Music</span></a> 
                <a class="dock-item" href="#"><img src=<s:url value="/jdock/images/logoff.png" />><span>Video</span></a> 
                <a class="dock-item" href="#" id="button_cadastro_servico"><img src=<s:url value="/jdock/images/add_service.png" />><span>Cadastro de Serviços</span></a> 
                <a class="dock-item" href="#" id="button_tabela_apoio"><img src=<s:url value="/jdock/images/tabela_apoio.png" />><span>Tabela de Apoio</span></a> 
            </div> 
        </div>
        <div id="div_temp"></div>
    </body>
</html>
